home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
bbs
/
last7_00.zip
/
LAST7.MEX
< prev
next >
Wrap
Text File
|
1996-09-22
|
6KB
|
205 lines
//////////////////////////////////////////////////////////////////////////////
// File: Last7.mex
// Desc: List selected number of Last callers , w/wo mail check
// Copyright 1996 by Gerry Ellison. All rights reserved.
// 1:108/107.0
// Free for non-commercial use
// $Id: last7.mex 1.0 10/01/1996 24:00:00 gre Exp $
//////////////////////////////////////////////////////////////////////////////
#include <max.mh>
#define LC_M "\x16\x01\x5B"
#define W_M "\x16\x01\x5F"
#define Y_M "\x16\x01\x5E"
void checkmail() {
print(COL_LMAGENTA+strpad(" ┌",76,'═')+COL_LMAGENTA"┐\n"
" │"Y_M"░░░▒▒▒▒▒▓▓▓▓▓████████ MAXIMUS"
" MAIL ████████▓▓▓▓▓▒▒▒▒▒░░░"COL_LMAGENTA"│\n"+
strpad(" ├",76,'─')+COL_LMAGENTA"┤","\n"
" └─"COL_LGREEN" Checking for mail........ "
COL_LRED"<CTRL><C> will abort... "COL_LMAGENTA"─┘\n"
" "); menu_cmd(418,""); //check mail
} //end check mail
Void drawheader() {
string: comment, bbs;
//" string must be exactly 38 chars long."
bbs :=" T H E M O U N T A I N T O P B B S "; // bbs name 38 chars.
// change comments if you want but KEEP the length.
if (usr.priv < 60)
comment := "--=[ For Additional Time see Main Menu. ]=--";
else
comment := "--=[ Thanks for your support!. ]=--";
print(COL_LMAGENTA+strpad(" ┌",76,'═')+"┐\n"+
" │"LC_M"░░░░░░"LC_M+AVATAR_BLINK"▒▒▒░"LC_M+AVATAR_BLINK"░▒▓█▓▒░"W_M" "+
bbs+" "LC_M+AVATAR_BLINK"░▒▓█▓▒░"LC_M+AVATAR_BLINK"░▒▒▒"LC_M"░░░░░░"
COL_LMAGENTA"│\n"
" │"W_M+strpad(" ",13,' ')+strpad(comment,61,' ')+COL_LMAGENTA"│\n"+
strpad(" ├",76,'─')+"┤\n"
" │ "COL_WHITE"L # Login For Access Caller's Name City, State Calls"COL_LMAGENTA"│\n"
" ├"COL_CYAN+strpad("─",74,'─')+COL_LMAGENTA"┤\n");
} //end draw header
int main(string: choice) { //Begin Main Program
//int main(string: choice , int: limit) { //Begin Main Program
int : ct, limit;
string: log_in, on_for, priv;
char : nonstop;
long : calls, pos;
if (choice = "" or strlower(choice) = "lu") { //begin luser
struct _callinfo: ci;
id.instant_video := 0;
if (strlower(choice) = "lu") {
limit :=15; // can be any length
print("\f");
}
else {
limit := 7; // number of users to show
print("\f\n");
}
if (call_open())
{
calls := call_numrecs();
reset_more(nonstop);
drawheader();
for (pos := calls -1; pos >= 0 AND call_read(pos, ci)
AND do_more(nonstop,COL_CYAN); pos := pos -1)
{ //begin array of selected names to not show.
// add as many names as you want BUT adjust the ARRAY, and FOR top limits.
int: i;
array [0..2] of string: no;
no[0] := "Gerry Ellison";
no[1] := "Gerald Ellison";
no[2] := "John Doe";
for (i := 0; i <= 2; i := i + 1)
if (strlower(ci.name) = strlower(no[i]))
goto noshow;
if (ci.flags & CALL_LOGON) { //begin list of names.
{ //begin priv. check.
int: i;
array [0..90] of string: privil;
privil[0] := " -Twit-";
privil[10] := "Vistor ";
privil[20] := "-Guest-";
privil[30] := "Regular";
privil[40] := "Special";
privil[50] := "VtSysOp";
privil[60] := "-=VIP=-";
privil[70] := "-=VIP=-";
privil[80] := "-=VIP=-";
privil[90] := "-SysOp-";
for (i := 0; i <= 90; i := i + 10)
if (ci.logoff_priv = i)
priv := privil[i];
} //end priv. check.
{ //begin log_in.
int: hour_on, hour_off;
hour_on:= strtoi(substr(stamp_string(ci.login),11,2));
if (hour_on > 11) {
hour_on:= hour_on-12;
log_in:= itostr(hour_on)+substr(stamp_string(ci.login),13,3)+"p";
}
else
log_in:= itostr(hour_on)+substr(stamp_string(ci.login),13,3)+"a";
if (hour_on < 10)
log_in:= " "+log_in;
} //end log_in.
{ //begin on_for
int: min_on, min_off, sec_on, sec_off;
min_on := strtoi(substr(stamp_string(ci.login),14,2));
min_off := strtoi(substr(stamp_string(ci.logoff),14,2));
if (min_on <= min_off)
min_on := min_off - min_on;
else
min_on := (60 - min_on) + min_off;
sec_on := strtoi(substr(stamp_string(ci.login),17,2));
sec_off := strtoi(substr(stamp_string(ci.logoff),17,2));
if (sec_on <= sec_off)
sec_on := sec_off - sec_on;
else
sec_on := (60 - sec_on) + sec_off;
if (sec_on > 59) {
sec_on := sec_on - 60;
min_on := min_on + 1;
}
if (sec_on <10)
on_for := strpadleft(itostr(min_on),2,' ')+":0"+itostr(sec_on);
else
on_for := strpadleft(itostr(min_on),2,' ')+":"+itostr(sec_on);
if (min_on > -1 or min_on <= 9)
on_for := " "+on_for;
} //end on_for.
{ //begin data
print(COL_LMAGENTA" │"
COL_MAGENTA+ strpadleft(strpad(itostr(ci.task),2,' '),3,' ')+
COL_LGREEN+ strpadleft(strpad(itostr(ct+1),3,' '),4,' ')+
COL_LMAGENTA+ log_in+
COL_LRED+ on_for+
COL_LGREEN+ strpadleft(strpad(priv,8,' '),9,' ')+
COL_YELLOW+ strpadleft(strpad(substr(ci.name,1,20),20,' '),1,' ')+
COL_LCYAN+ substr(strpad(substr(ci.city,1,stridx(ci.city,1,',')),18,' '),1,18)+
substr(ci.city,1+stridx(ci.city,1,','),3)+
COL_RED+ strpadleft(strpad(itostr(ci.calls),4,' '),5,' ')+
COL_LMAGENTA"│\n");
} //end data
ct := ct + 1;
} //end not show.
noshow:
if (ct >= limit) goto out;
} // end list of names.
out:
call_close();
print(strpad(" ╚",76,'═')+"╝\n");
if (strlower(choice) = "lu") { //if last user
menu_cmd(106,""); // enter
return 0;
}
else
sleep(50); // pause
}
} //end lu
if (choice = "" or strlower(choice) = "ml") { //begin mail
if (strlower(choice) = "ml")
print("\f");
checkmail();
} //end mail
return 0;
} //end main program